<?php
	session_start();

	include("script/php/connect.php");
	
		$user = strip_tags($_POST['LoginName']);
	$pass = md5(md5(md5($_POST['LoginPass'])));
	
	
	$query = "SELECT * FROM Users WHERE name='$user'";
	$result = mysql_query($query);
	if($row = mysql_fetch_assoc($result))
	{
		$_SESSION['user'] = $user;
		header("Location: Build.php");
	}
	else
	{
		header("Location: index.php");
	}
?>